{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/carlosxabel/Google Drive New/HE UK/Analysis PSRM/Final codes/20200107 Log for PSRM review.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 7 Jan 2021, 17:56:25

{com}. do "/var/folders/56/s6v3952915l8lsqq91n_j1vh0000gn/T//SD01023.000000"
{txt}
{com}. 
. /////Perceived Beneficiaries and Support for the Globalization of Higher Education: 
> /// A Survey Experiment on Attitudes toward International Students
> //Political Science Research and Methods
. //Gift, Thomas and Lastra-Anadón, Carlos X.
. 
. 
. clear
{txt}
{com}. *ssc install estout
. nobreak
{txt}
{com}. cd "/Users/carlosxabel/Google Drive New/HE UK/Analysis PSRM/Final codes/"
{res}/Users/carlosxabel/Google Drive New/HE UK/Analysis PSRM/Final codes
{txt}
{com}. 
. 
. *Data file
.  use "20200107 UKsurvey.dta"
{txt}
{com}. 
.  
.  
. 
. 
. 
. global outcvariables capforeignstudents moregovspending  biggertuitforeign prefdomestics
{txt}
{com}.   
. global indivcontrols female age children white bornuk somecollege unemployed incometsd incomeimp
{txt}
{com}.         
. //////////////
> /////Main Table
> //////////////
>           
.           
.  
. **********Table 1*************
. 
.                   eststo clear
{txt}
{com}.    foreach var of global outcvariables  {c -(}
{txt}  2{com}.   quietly reg `var' heforeigntreat   $indivcontrols, r
{txt}  3{com}.   eststo `var'1
{txt}  4{com}.   
.  quietly  reg `var' heforeigntreat  hetreat2  hetreat3 $indivcontrols, r
{txt}  5{com}.   eststo `var'2
{txt}  6{com}.  
.  {c )-}
{txt}
{com}.  
.  
.   esttab capforeignstudents1 capforeignstudents2, drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{txt}Foreign students    {res}       0.0827***       0.0317   {txt}
                    {res} {ralign 12:{txt:(}0.0233{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}   {txt}

{txt}Crowdout            {res}                       0.0872***{txt}
                    {res}                 {ralign 12:{txt:(}0.0260{txt:)}}   {txt}

{txt}Brain Drain         {res}                       0.0404   {txt}
                    {res}                 {ralign 12:{txt:(}0.0260{txt:)}}   {txt}

{txt}Constant            {res}        0.353***        0.355***{txt}
                    {res} {ralign 12:{txt:(}0.0532{txt:)}}    {ralign 12:{txt:(}0.0529{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         3000            3000   {txt}
{txt}R-squared           {res}        0.079           0.083   {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.     
.  ///Tex: esttab capforeignstudents1 capforeignstudents2  using "Table 1.tex", drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>    
.    
.   
.   
. //////////////
> ///////Figures
> ///////////
>   
.   set scheme s2mono
{txt}
{com}.   
.   
.    ***Figure 1
.    quietly  reg capforeignstudents heforeigntreat      $indivcontrols, r
{txt}
{com}.   margins, over(heforeigntreat ) post
{res}
{txt}Predictive margins{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:heforeigntreat}{p_end}
{p2colreset}{...}

{res}{txt}{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 16}{c |}{col 28} Delta-method
{col 16}{c |}     Margin{col 28}   Std. Err.{col 40}      t{col 48}   P>|t|{col 56}     [95% Con{col 69}f. Interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
heforeigntreat {c |}
{space 12}0  {c |}{col 16}{res}{space 2} .5309381{col 28}{space 2} .0213664{col 39}{space 1}   24.85{col 48}{space 3}0.000{col 56}{space 4} .4890438{col 69}{space 3} .5728324
{txt}{space 12}1  {c |}{col 16}{res}{space 2} .6110444{col 28}{space 2} .0094055{col 39}{space 1}   64.97{col 48}{space 3}0.000{col 56}{space 4} .5926025{col 69}{space 3} .6294863
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.   
.     coefplot,  drop(_cons female age children white bornuk somecollege unemployed incometsd incomeimp) recast(bar) ///
>   vertical xtitle(" ") graphregion(color(white)) ytitle("Probability of supporting a cap")   title(" ")   barwidth(0.5)  fcolor(*.5)   ciopts(recast(rcap)) citop ysc(r(0  .7))  ylabel(0 (.1) .7, nogrid) ///
>   xlabel(1 "Control" 2 `" "Any" "Treatment" "'  ) title(" ") ///
>    
{res}{txt}
{com}.    
.  
.  ****Figure 2
.   quietly  reg capforeignstudents heforeigntreat  hetreat2   hetreat3    $indivcontrols, r
{txt}
{com}.    margins, over(heforeigntreat hetreat2  hetreat3 ) post
{res}
{txt}Predictive margins{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:heforeigntreat hetreat2 hetreat3}{p_end}
{p2colreset}{...}

{res}{txt}{hline 33}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 34}{c |}{col 46} Delta-method
{col 34}{c |}     Margin{col 46}   Std. Err.{col 58}      t{col 66}   P>|t|{col 74}     [95% Con{col 87}f. Interval]
{hline 33}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
heforeigntreat#hetreat2#hetreat3 {c |}
{space 26}0 0 0  {c |}{col 34}{res}{space 2} .5309381{col 46}{space 2} .0213738{col 57}{space 1}   24.84{col 66}{space 3}0.000{col 74}{space 4} .4890293{col 87}{space 3} .5728469
{txt}{space 26}1 0 0  {c |}{col 34}{res}{space 2}     .556{col 46}{space 2} .0214083{col 57}{space 1}   25.97{col 66}{space 3}0.000{col 74}{space 4} .5140235{col 87}{space 3} .5979765
{txt}{space 26}1 0 1  {c |}{col 34}{res}{space 2} .6062124{col 46}{space 2} .0147753{col 57}{space 1}   41.03{col 66}{space 3}0.000{col 74}{space 4} .5772416{col 87}{space 3} .6351833
{txt}{space 26}1 1 0  {c |}{col 34}{res}{space 2} .6433566{col 46}{space 2} .0147523{col 57}{space 1}   43.61{col 66}{space 3}0.000{col 74}{space 4}  .614431{col 87}{space 3} .6722823
{txt}{hline 33}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.   
.     coefplot,  drop(_cons female age children white bornuk somecollege unemployed incometsd incomeimp) recast(bar) ///
>   vertical xtitle(" ") graphregion(color(white)) ytitle("Probability of supporting a cap")   title(" ")   barwidth(0.5)  fcolor(*.5)   ciopts(recast(rcap)) citop ysc(r(0  .7))  ylabel(0 (.1) .7, nogrid) ///
>   xlabel(1 "Control" 2 `" "Simple" "Foreign" "' 4  "Crowdout"   3 `" "Human Capital" "Flight" "') title(" ") 
{res}{txt}
{com}.    
.    
.    
.    ****Figure 3 (By demographic subgroups)
.   
.    *Some College
.       quietly reg capforeignstudents hetreat2##somecollege    age       female  children white bornuk  unemployed incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( somecollege     ) at((means) _all) 
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:somecollege}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.somecollege}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6717325 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3282675 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}47.59635 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5495441 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6395137 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9392097 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9513678 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.5142857 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}26.23708 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0723404 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 4}.337386 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1702128 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.somecollege}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6597786 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3402214 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}44.89446 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4664207 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5896679 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8686347 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 4}.896679 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.3424354 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}39.47232 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0723247 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3269373 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1630996 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 21}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 22}{c |}{col 34} Delta-method
{col 22}{c |}     Margin{col 34}   Std. Err.{col 46}      t{col 54}   P>|t|{col 62}     [95% Con{col 75}f. Interval]
{hline 21}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
somecollege#hetreat2 {c |}
{space 16}0 0  {c |}{col 22}{res}{space 2} .6577565{col 34}{space 2}  .015205{col 45}{space 1}   43.26{col 54}{space 3}0.000{col 62}{space 4} .6279431{col 75}{space 3} .6875699
{txt}{space 16}0 1  {c |}{col 22}{res}{space 2} .7410724{col 34}{space 2} .0226241{col 45}{space 1}   32.76{col 54}{space 3}0.000{col 62}{space 4} .6967119{col 75}{space 3} .7854328
{txt}{space 16}1 0  {c |}{col 22}{res}{space 2}  .460263{col 34}{space 2} .0175076{col 45}{space 1}   26.29{col 54}{space 3}0.000{col 62}{space 4} .4259348{col 75}{space 3} .4945912
{txt}{space 16}1 1  {c |}{col 22}{res}{space 2} .5521148{col 34}{space 2} .0261913{col 45}{space 1}   21.08{col 54}{space 3}0.000{col 62}{space 4} .5007599{col 75}{space 3} .6034696
{txt}{hline 21}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot, xtitle(" ") graphregion(color(white))  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)   legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "No college"  "Some college")) xscale(range(-0.2 1.2) ) 
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 somecollege{p_end}
{res}{txt}
{com}.  graph save Graph "Somecollege.gph", replace
{txt}(note: file Somecollege.gph not found)
{res}{txt}(file Somecollege.gph saved)

{com}.  
.  
.  * College graduate
.       quietly reg capforeignstudents hetreat2##collegegraduate    age       female  children white bornuk  unemployed incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( collegegraduate     ) at((means) _all) 
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:collegegraduate}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.collegegraduate}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6762552 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3237448 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:collegegraduate}{space 1}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}47.20554 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5465481 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6323222 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9341004 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9435146 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 4}.501569 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}26.82531 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0726987 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 4}.333159 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1746862 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.collegegraduate}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6488971 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3511029 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:collegegraduate}{space 1}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 4}44.9182 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4512868 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5900735 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8602941 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.8970588 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.3226103 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}41.68658 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0716912 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3318015 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1534926 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 25}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 26}{c |}{col 38} Delta-method
{col 26}{c |}     Margin{col 38}   Std. Err.{col 50}      t{col 58}   P>|t|{col 66}     [95% Con{col 79}f. Interval]
{hline 25}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
collegegraduate#hetreat2 {c |}
{space 20}0 0  {c |}{col 26}{res}{space 2} .6365708{col 38}{space 2} .0144048{col 49}{space 1}   44.19{col 58}{space 3}0.000{col 66}{space 4} .6083264{col 79}{space 3} .6648152
{txt}{space 20}0 1  {c |}{col 26}{res}{space 2} .7316865{col 38}{space 2} .0218225{col 49}{space 1}   33.53{col 58}{space 3}0.000{col 66}{space 4} .6888978{col 79}{space 3} .7744751
{txt}{space 20}1 0  {c |}{col 26}{res}{space 2} .4455501{col 38}{space 2} .0193492{col 49}{space 1}   23.03{col 58}{space 3}0.000{col 66}{space 4} .4076111{col 79}{space 3} .4834892
{txt}{space 20}1 1  {c |}{col 26}{res}{space 2} .5299519{col 38}{space 2} .0282162{col 49}{space 1}   18.78{col 58}{space 3}0.000{col 66}{space 4} .4746268{col 79}{space 3} .5852769
{txt}{hline 25}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid) legend(region(lcolor(white))) xlabel(, notick)  ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Not graduate"  "University graduate")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 collegegraduate{p_end}
{res}{txt}
{com}.  graph save Graph "Notcollegegraduate.gph", replace
{txt}(note: file Notcollegegraduate.gph not found)
{res}{txt}(file Notcollegegraduate.gph saved)

{com}.  
.  
.  *Female
.      quietly reg capforeignstudents hetreat2##female age  somecollege           children white bornuk  unemployed incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( female     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:female}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.female}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6550546 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3449454 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}49.42281 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4938525 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6045082 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9125683 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9310109 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4009563 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}36.57787 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0553279 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3189891 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1632514 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.female}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6770833 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3229167 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}43.47201 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4114583 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6289063 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9023438 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 4}.922526 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4707031 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}28.05664 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0885417 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3457031 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1705729 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29} Delta-method
{col 17}{c |}     Margin{col 29}   Std. Err.{col 41}      t{col 49}   P>|t|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
female#hetreat2 {c |}
{space 11}0 0  {c |}{col 17}{res}{space 2} .4892931{col 29}{space 2} .0168709{col 40}{space 1}   29.00{col 49}{space 3}0.000{col 57}{space 4} .4562134{col 70}{space 3} .5223728
{txt}{space 11}0 1  {c |}{col 17}{res}{space 2} .6035008{col 29}{space 2} .0247591{col 40}{space 1}   24.37{col 49}{space 3}0.000{col 57}{space 4} .5549543{col 70}{space 3} .6520474
{txt}{space 11}1 0  {c |}{col 17}{res}{space 2} .6441181{col 29}{space 2} .0156394{col 40}{space 1}   41.19{col 49}{space 3}0.000{col 57}{space 4} .6134531{col 70}{space 3} .6747832
{txt}{space 11}1 1  {c |}{col 17}{res}{space 2} .7038652{col 29}{space 2} .0236834{col 40}{space 1}   29.72{col 49}{space 3}0.000{col 57}{space 4} .6574278{col 70}{space 3} .7503027
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))    ytitle(" ")title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Male"  "Female")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 female{p_end}
{res}{txt}
{com}.  graph save Graph "Female.gph", replace
{txt}(note: file Female.gph not found)
{res}{txt}(file Female.gph saved)

{com}.    
.    
.   *Children 
.        quietly reg capforeignstudents hetreat2##children female age  somecollege            white bornuk  unemployed incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( children     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:children}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.children}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6588338 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3411662 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4960836 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}40.09225 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 4}.483899 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8764143 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9173194 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 4}.413403 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}29.76936 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0931245 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3185379 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1644909 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.children}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6709887 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3290113 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5218801 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}50.27661 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4316586 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9265262 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9324689 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4511075 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}33.73312 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0594273 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3414371 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1685575 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 18}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 19}{c |}{col 31} Delta-method
{col 19}{c |}     Margin{col 31}   Std. Err.{col 43}      t{col 51}   P>|t|{col 59}     [95% Con{col 72}f. Interval]
{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
children#hetreat2 {c |}
{space 13}0 0  {c |}{col 19}{res}{space 2} .4800064{col 31}{space 2}  .018697{col 42}{space 1}   25.67{col 51}{space 3}0.000{col 59}{space 4}  .443346{col 72}{space 3} .5166667
{txt}{space 13}0 1  {c |}{col 19}{res}{space 2} .5934571{col 31}{space 2}  .027688{col 42}{space 1}   21.43{col 51}{space 3}0.000{col 59}{space 4} .5391675{col 72}{space 3} .6477467
{txt}{space 13}1 0  {c |}{col 19}{res}{space 2}  .623615{col 31}{space 2} .0146294{col 42}{space 1}   42.63{col 51}{space 3}0.000{col 59}{space 4} .5949303{col 72}{space 3} .6522998
{txt}{space 13}1 1  {c |}{col 19}{res}{space 2} .6937112{col 31}{space 2} .0220597{col 42}{space 1}   31.45{col 51}{space 3}0.000{col 59}{space 4} .6504576{col 72}{space 3} .7369649
{txt}{hline 18}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))   ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Not Parent"  "Parent")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 children{p_end}
{res}{txt}
{com}.  graph save Graph "Children.gph", replace
{txt}(note: file Children.gph not found)
{res}{txt}(file Children.gph saved)

{com}.  
.  
.    *White 
.        quietly reg capforeignstudents hetreat2##white children female age  somecollege             bornuk  unemployed incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( white     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:white}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.white}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6834532 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3165468 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.4892086 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5395683 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}33.55396 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.6402878 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.7194245 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.2661871 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}35.35971 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.1294964 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3309353 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1870504 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.white}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6645849 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3354151 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6300514 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5091844 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}47.68553 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4324026 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9478325 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4540779 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}31.89383 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0664952 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3328435 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1649522 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 16}{c |}{col 28} Delta-method
{col 16}{c |}     Margin{col 28}   Std. Err.{col 40}      t{col 48}   P>|t|{col 56}     [95% Con{col 69}f. Interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
white#hetreat2 {c |}
{space 10}0 0  {c |}{col 16}{res}{space 2}  .397912{col 28}{space 2}  .036286{col 39}{space 1}   10.97{col 48}{space 3}0.000{col 56}{space 4} .3267639{col 69}{space 3} .4690602
{txt}{space 10}0 1  {c |}{col 16}{res}{space 2} .5840536{col 28}{space 2} .0523895{col 39}{space 1}   11.15{col 48}{space 3}0.000{col 56}{space 4} .4813303{col 69}{space 3} .6867768
{txt}{space 10}1 0  {c |}{col 16}{res}{space 2} .5860234{col 28}{space 2} .0127771{col 39}{space 1}   45.87{col 48}{space 3}0.000{col 56}{space 4} .5609706{col 69}{space 3} .6110762
{txt}{space 10}1 1  {c |}{col 16}{res}{space 2} .6636185{col 28}{space 2} .0196809{col 39}{space 1}   33.72{col 48}{space 3}0.000{col 56}{space 4}  .625029{col 69}{space 3}  .702208
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Non-White"  "White")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 white{p_end}
{res}{txt}
{com}.  graph save Graph "White.gph", replace
{txt}(note: file White.gph not found)
{res}{txt}(file White.gph saved)

{com}.    
.    
.    
.      *Born UK 
.        quietly reg capforeignstudents hetreat2##bornuk white children female age  somecollege               unemployed incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( bornuk     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:bornuk}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.bornuk}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6636364 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3363636 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.6454545 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5681818 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5409091 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 7}40.8 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.6363636 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.3181818 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}34.47727 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.1272727 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3181818 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1772727 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.bornuk}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6665468 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3334532 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9280576 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6208633 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5097122 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}46.81727 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4370504 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4460432 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}32.03597 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0679856 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3338129 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1661871 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29} Delta-method
{col 17}{c |}     Margin{col 29}   Std. Err.{col 41}      t{col 49}   P>|t|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
bornuk#hetreat2 {c |}
{space 11}0 0  {c |}{col 17}{res}{space 2} .4590588{col 29}{space 2} .0413623{col 40}{space 1}   11.10{col 49}{space 3}0.000{col 57}{space 4} .3779573{col 70}{space 3} .5401603
{txt}{space 11}0 1  {c |}{col 17}{res}{space 2} .5537489{col 29}{space 2} .0583349{col 40}{space 1}    9.49{col 49}{space 3}0.000{col 57}{space 4} .4393682{col 70}{space 3} .6681296
{txt}{space 11}1 0  {c |}{col 17}{res}{space 2} .5772227{col 29}{space 2} .0126329{col 40}{space 1}   45.69{col 49}{space 3}0.000{col 57}{space 4} .5524526{col 70}{space 3} .6019929
{txt}{space 11}1 1  {c |}{col 17}{res}{space 2} .6638687{col 29}{space 2} .0196089{col 40}{space 1}   33.86{col 49}{space 3}0.000{col 57}{space 4} .6254203{col 70}{space 3} .7023171
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))  ytitle(" ") title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Not born in UK"  "Born in UK")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 bornuk{p_end}
{res}{txt}
{com}.  graph save Graph "BornUK.gph", replace
{txt}(note: file BornUK.gph not found)
{res}{txt}(file BornUK.gph saved)

{com}.    
.    
.       *Unemployed
.        quietly reg capforeignstudents hetreat2##unemployed bornuk white children female age  somecollege                incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( unemployed     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:unemployed}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.unemployed}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6650888 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3349112 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9112426 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8792899 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6011834 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4810651 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 4}39.6929 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.5272189 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}38.92308 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0491124 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3272189 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1656805 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.unemployed}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6679389 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3320611 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9465649 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9435115 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6374046 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5519084 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}54.99771 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.3541985 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}23.56107 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.1022901 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3396947 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1687023 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33} Delta-method
{col 21}{c |}     Margin{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
unemployed#hetreat2 {c |}
{space 15}0 0  {c |}{col 21}{res}{space 2} .5516833{col 33}{space 2}   .01544{col 44}{space 1}   35.73{col 53}{space 3}0.000{col 61}{space 4} .5214092{col 74}{space 3} .5819574
{txt}{space 15}0 1  {c |}{col 21}{res}{space 2} .6376466{col 33}{space 2} .0231672{col 44}{space 1}   27.52{col 53}{space 3}0.000{col 61}{space 4} .5922213{col 74}{space 3} .6830719
{txt}{space 15}1 0  {c |}{col 21}{res}{space 2}  .590312{col 33}{space 2} .0171512{col 44}{space 1}   34.42{col 53}{space 3}0.000{col 61}{space 4} .5566827{col 74}{space 3} .6239413
{txt}{space 15}1 1  {c |}{col 21}{res}{space 2} .6792575{col 33}{space 2} .0255349{col 44}{space 1}   26.60{col 53}{space 3}0.000{col 61}{space 4} .6291898{col 74}{space 3} .7293252
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white)) ytitle(" ")  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Employed"  "Not employed")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 unemployed{p_end}
{res}{txt}
{com}.  graph save Graph "Unemployed.gph", replace
{txt}(note: file Unemployed.gph not found)
{res}{txt}(file Unemployed.gph saved)

{com}.  
.  
.  
.    *Income
.        quietly reg capforeignstudents hetreat2##abovemedincome bornuk white children female age  somecollege          hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( abovemedincome     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:abovemedincome}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.abovemedincome}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6666667 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3333333 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:abovemedincome}{space 2}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9327808 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9060773 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5349908 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.6141805 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 4}46.6639 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.3314917 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3443831 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1482505 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.abovemedincome}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6661442 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3338558 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:abovemedincome}{space 2}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9231975 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 4}.908046 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6635319 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 4}.454023 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}46.21264 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.5198537 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3260188 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1776385 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 24}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 25}{c |}{col 37} Delta-method
{col 25}{c |}     Margin{col 37}   Std. Err.{col 49}      t{col 57}   P>|t|{col 65}     [95% Con{col 78}f. Interval]
{hline 24}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
abovemedincome#hetreat2 {c |}
{space 19}0 0  {c |}{col 25}{res}{space 2} .5979756{col 37}{space 2} .0186347{col 48}{space 1}   32.09{col 57}{space 3}0.000{col 65}{space 4} .5614375{col 78}{space 3} .6345137
{txt}{space 19}0 1  {c |}{col 25}{res}{space 2} .7073637{col 37}{space 2} .0266583{col 48}{space 1}   26.53{col 57}{space 3}0.000{col 65}{space 4} .6550933{col 78}{space 3} .7596342
{txt}{space 19}1 0  {c |}{col 25}{res}{space 2} .5528441{col 37}{space 2} .0146561{col 48}{space 1}   37.72{col 57}{space 3}0.000{col 65}{space 4} .5241071{col 78}{space 3} .5815811
{txt}{space 19}1 1  {c |}{col 25}{res}{space 2} .6246068{col 37}{space 2} .0225357{col 48}{space 1}   27.72{col 57}{space 3}0.000{col 65}{space 4} .5804196{col 78}{space 3} .6687939
{txt}{hline 24}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white)) ytitle(" ")  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Low income"  "High income")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 abovemedincome{p_end}
{res}{txt}
{com}.  graph save Graph "Income.gph", replace
{txt}(note: file Income.gph not found)
{res}{txt}(file Income.gph saved)

{com}.  
.  *Brexiteer
.       quietly reg capforeignstudents hetreat2##brexiteer brexitneutral unemployed bornuk white children female age  somecollege                incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( brexiteer     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:brexiteer}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.brexiteer}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 5}.65945 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 5}.34055 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:brexiteer}{space 7}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:brexitneut~l}{space 4}{txt:=} {space 3}.2106495 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4072557 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9069631 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8812171 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5652428 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5213575 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}43.10532 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.5342305 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}34.07548 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0690462 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 5}.34055 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1521358 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.brexiteer}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6754454 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3245546 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:brexiteer}{space 7}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:brexitneut~l}{space 4}{txt:=} {space 10}0 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4756003 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9527498 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9419055 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6855151 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4996127 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}50.70565 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.3423703 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}29.75213 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0766847 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3222308 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 4}.186677 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32} Delta-method
{col 20}{c |}     Margin{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
brexiteer#hetreat2 {c |}
{space 14}0 0  {c |}{col 20}{res}{space 2} .4637707{col 32}{space 2} .0154433{col 43}{space 1}   30.03{col 52}{space 3}0.000{col 60}{space 4} .4334901{col 73}{space 3} .4940512
{txt}{space 14}0 1  {c |}{col 20}{res}{space 2} .5658599{col 32}{space 2} .0233608{col 43}{space 1}   24.22{col 52}{space 3}0.000{col 60}{space 4}  .520055{col 73}{space 3} .6116647
{txt}{space 14}1 0  {c |}{col 20}{res}{space 2} .7051252{col 32}{space 2} .0161173{col 43}{space 1}   43.75{col 52}{space 3}0.000{col 60}{space 4}  .673523{col 73}{space 3} .7367273
{txt}{space 14}1 1  {c |}{col 20}{res}{space 2} .7783553{col 32}{space 2} .0236075{col 43}{space 1}   32.97{col 52}{space 3}0.000{col 60}{space 4} .7320666{col 73}{space 3}  .824644
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))  ytitle(" ") title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid) legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Brexit remainer"  "Brexit leaver")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 brexiteer{p_end}
{res}{txt}
{com}.  graph save Graph "Brexiteer.gph", replace
{txt}(note: file Brexiteer.gph not found)
{res}{txt}(file Brexiteer.gph saved)

{com}.  
.  
.  *Conservative
.       quietly reg capforeignstudents hetreat2##conservative  unemployed bornuk white children female age  somecollege                incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( conservative     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:conservative}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.conservative}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6716488 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3283512 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:conservative}{space 4}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4212985 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9243344 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8935077 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 4}.601121 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5469407 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}43.37412 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4465203 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 4}29.8482 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0723961 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3376927 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1718823 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.conservative}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 4}.653085 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 4}.346915 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:conservative}{space 4}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:unemployed}{space 6}{txt:=} {space 3}.4749709 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9324796 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9417928 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6565774 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4249127 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}53.85797 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4644936 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}38.11409 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0721769 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3201397 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1548312 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}     Margin{col 35}   Std. Err.{col 47}      t{col 55}   P>|t|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
conservative#hetreat2 {c |}
{space 17}0 0  {c |}{col 23}{res}{space 2} .5551614{col 35}{space 2}  .013969{col 46}{space 1}   39.74{col 55}{space 3}0.000{col 63}{space 4} .5277716{col 76}{space 3} .5825512
{txt}{space 17}0 1  {c |}{col 23}{res}{space 2} .6453455{col 35}{space 2} .0216096{col 46}{space 1}   29.86{col 55}{space 3}0.000{col 63}{space 4} .6029743{col 76}{space 3} .6877167
{txt}{space 17}1 0  {c |}{col 23}{res}{space 2} .6007428{col 35}{space 2}  .020753{col 46}{space 1}   28.95{col 55}{space 3}0.000{col 63}{space 4} .5600512{col 76}{space 3} .6414344
{txt}{space 17}1 1  {c |}{col 23}{res}{space 2} .6845078{col 35}{space 2} .0295259{col 46}{space 1}   23.18{col 55}{space 3}0.000{col 63}{space 4} .6266145{col 76}{space 3}  .742401
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white))  ytitle(" ") title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid) legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label(  "Non-Conservative"  "Conservative")) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 conservative{p_end}
{res}{txt}
{com}.  graph save Graph "Conservative.gph", replace
{txt}(note: file Conservative.gph not found)
{res}{txt}(file Conservative.gph saved)

{com}.   
.   *Immigration exposure
.        quietly reg capforeignstudents hetreat2##abovemdmigration bornuk white children female age  somecollege       incometsd incomeimp   hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( abovemdmigration     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6714179 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3285821 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:abovemdmigration}{txt:=} {space 10}0}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9497374 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9437359 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6699175 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5326332 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}48.12828 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 4}.411853 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}31.09152 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0735184 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3540885 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1627907 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6622675 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3377325 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:abovemdmigration}{txt:=} {space 10}1}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9082184 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8782244 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5746851 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4955009 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}44.97481 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4835033 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}33.11338 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0713857 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3155369 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1703659 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 26}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 27}{c |}{col 39} Delta-method
{col 27}{c |}     Margin{col 39}   Std. Err.{col 51}      t{col 59}   P>|t|{col 67}     [95% Con{col 80}f. Interval]
{hline 26}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
abovemdmigration#hetreat2 {c |}
{space 21}0 0  {c |}{col 27}{res}{space 2} .5996967{col 39}{space 2} .0170152{col 50}{space 1}   35.24{col 59}{space 3}0.000{col 67}{space 4} .5663341{col 80}{space 3} .6330594
{txt}{space 21}0 1  {c |}{col 27}{res}{space 2} .6901174{col 39}{space 2} .0250929{col 50}{space 1}   27.50{col 59}{space 3}0.000{col 67}{space 4} .6409163{col 80}{space 3} .7393185
{txt}{space 21}1 0  {c |}{col 27}{res}{space 2} .5442658{col 39}{space 2} .0155743{col 50}{space 1}   34.95{col 59}{space 3}0.000{col 67}{space 4} .5137285{col 80}{space 3} .5748032
{txt}{space 21}1 1  {c |}{col 27}{res}{space 2} .6272301{col 39}{space 2}  .023475{col 50}{space 1}   26.72{col 59}{space 3}0.000{col 67}{space 4} .5812012{col 80}{space 3} .6732589
{txt}{hline 26}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white)) ytitle(" ")  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label( "Low imm."  "High imm."  )) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 abovemdmigration{p_end}
{res}{txt}
{com}.  graph save Graph "Immigration.gph", replace
{txt}(note: file Immigration.gph not found)
{res}{txt}(file Immigration.gph saved)

{com}.  
.  
.  *Old
.  
.        quietly reg capforeignstudents hetreat2##agegroup6 bornuk white children female age  somecollege       incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( abovemdmigration     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6714179 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3285821 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.agegroup6}{space 5}{txt:=} {space 3}.7419355 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.agegroup6}{space 5}{txt:=} {space 3}.2580645 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9497374 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9437359 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6699175 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5326332 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}48.12828 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 4}.411853 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}31.09152 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0735184 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3540885 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1627907 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6622675 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3377325 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.agegroup6}{space 5}{txt:=} {space 3}.7954409 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.agegroup6}{space 5}{txt:=} {space 3}.2045591 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9082184 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8782244 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5746851 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4955009 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}44.97481 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4835033 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}33.11338 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0713857 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3155369 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1703659 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 26}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 27}{c |}{col 39} Delta-method
{col 27}{c |}     Margin{col 39}   Std. Err.{col 51}      t{col 59}   P>|t|{col 67}     [95% Con{col 80}f. Interval]
{hline 26}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
abovemdmigration#hetreat2 {c |}
{space 21}0 0  {c |}{col 27}{res}{space 2} .5901387{col 39}{space 2} .0121632{col 50}{space 1}   48.52{col 59}{space 3}0.000{col 67}{space 4} .5662895{col 80}{space 3} .6139878
{txt}{space 21}0 1  {c |}{col 27}{res}{space 2} .6775998{col 39}{space 2} .0194509{col 50}{space 1}   34.84{col 59}{space 3}0.000{col 67}{space 4} .6394613{col 80}{space 3} .7157383
{txt}{space 21}1 0  {c |}{col 27}{res}{space 2} .5514968{col 39}{space 2}  .012623{col 50}{space 1}   43.69{col 59}{space 3}0.000{col 67}{space 4} .5267462{col 80}{space 3} .5762474
{txt}{space 21}1 1  {c |}{col 27}{res}{space 2} .6377987{col 39}{space 2}  .019191{col 50}{space 1}   33.23{col 59}{space 3}0.000{col 67}{space 4} .6001699{col 80}{space 3} .6754276
{txt}{hline 26}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white)) ytitle(" ")  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label( "Below 65"  "Over 65"  )) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 abovemdmigration{p_end}
{res}{txt}
{com}.  graph save Graph "Old.gph", replace
{txt}(note: file Old.gph not found)
{res}{txt}(file Old.gph saved)

{com}.  
.  
.  *Young
.  *gen below30=1 if age<=30
.  *replace below30=0 if age>30
.  
.  
.         quietly reg capforeignstudents hetreat2##below30 bornuk white children female age  somecollege       incometsd incomeimp hetreat3 controlgroup, r
{txt}
{com}.   margins hetreat2, over( abovemdmigration     ) at((means) _all)
{res}
{txt}Adjusted predictions{col 49}Number of obs{col 67}= {res}     3,000
{txt}{col 1}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:over}:{space 1}{res:abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:at}:{space 1}{res:0.abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6714179 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3285821 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.below30}{space 7}{txt:=} {space 4}.756189 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.below30}{space 7}{txt:=} {space 4}.243811 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9497374 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.9437359 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.6699175 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.5326332 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}48.12828 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 4}.411853 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}31.09152 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0735184 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3540885 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1627907 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:1.abovemdmigration}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.hetreat2}{space 6}{txt:=} {space 3}.6622675 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.hetreat2}{space 6}{txt:=} {space 3}.3377325 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:0.below30}{space 7}{txt:=} {space 3}.6820636 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:1.below30}{space 7}{txt:=} {space 3}.3179364 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:bornuk}{space 10}{txt:=} {space 3}.9082184 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:white}{space 11}{txt:=} {space 3}.8782244 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:children}{space 8}{txt:=} {space 3}.5746851 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:female}{space 10}{txt:=} {space 3}.4955009 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:age}{space 13}{txt:=} {space 3}44.97481 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:somecollege}{space 5}{txt:=} {space 3}.4835033 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incometsd}{space 7}{txt:=} {space 3}33.11338 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:incomeimp}{space 7}{txt:=} {space 3}.0713857 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:hetreat3}{space 8}{txt:=} {space 3}.3155369 {txt:(mean)}}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col: }{space 2}{res:{space 4}{txt:controlgroup}{space 4}{txt:=} {space 3}.1703659 {txt:(mean)}}{p_end}
{p2colreset}{...}

{res}{txt}{hline 26}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 27}{c |}{col 39} Delta-method
{col 27}{c |}     Margin{col 39}   Std. Err.{col 51}      t{col 59}   P>|t|{col 67}     [95% Con{col 80}f. Interval]
{hline 26}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
abovemdmigration#hetreat2 {c |}
{space 21}0 0  {c |}{col 27}{res}{space 2} .5900895{col 39}{space 2}  .012155{col 50}{space 1}   48.55{col 59}{space 3}0.000{col 67}{space 4} .5662564{col 80}{space 3} .6139227
{txt}{space 21}0 1  {c |}{col 27}{res}{space 2} .6779433{col 39}{space 2} .0194213{col 50}{space 1}   34.91{col 59}{space 3}0.000{col 67}{space 4} .6398627{col 80}{space 3} .7160238
{txt}{space 21}1 0  {c |}{col 27}{res}{space 2} .5516544{col 39}{space 2} .0126263{col 50}{space 1}   43.69{col 59}{space 3}0.000{col 67}{space 4} .5268974{col 80}{space 3} .5764115
{txt}{space 21}1 1  {c |}{col 27}{res}{space 2} .6363751{col 39}{space 2}  .019258{col 50}{space 1}   33.04{col 59}{space 3}0.000{col 67}{space 4} .5986148{col 80}{space 3} .6741355
{txt}{hline 26}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    marginsplot,   xtitle(" ") graphregion(color(white)) ytitle(" ")  ytitle(" ")  title(" ") ciopts(recast(rcap))   ylabel(0 (.1) .8, nogrid)  legend(region(lcolor(white))) xlabel(, notick) ///
>  recast(scatter)  level(90)  ///
>  xlabel(0 " " 1  " " ) ///
>  plot(, label( "Over 30"  "Below 30"  )) xscale(range(-0.2 1.2) )
{res}
{text}{p 2 6 2}Variables that uniquely identify margins: hetreat2 abovemdmigration{p_end}
{res}{txt}
{com}.  graph save Graph "Young.gph", replace
{txt}(note: file Young.gph not found)
{res}{txt}(file Young.gph saved)

{com}.  
.  
.    graph combine "Female.gph" "White.gph" "BornUK.gph" "Children.gph"  "Notcollegegraduate.gph" "Income.gph"  "Unemployed.gph"  "Brexiteer.gph" "Conservative.gph" "Immigration.gph" "Old.gph" "Young.gph", col(3) 
{res}{txt}
{com}.  
.    
.   
.                 
.                 
. //////////////////              
> //////////Appendix Materials//////////
> /////////////////////////////
> 
. **** Table A2**
.         *Balance tables and comparison with UK averages (column 0 is imputed manually)
.                   balancetable (mean if hetreatall==0)   (mean if hetreatall==1) (diff hetreat1 if (hetreatall!=2 & hetreatall!=3) ) (mean if hetreatall==2) (diff hetreat2 if hetreatall!=1 & hetreatall!=3 ) ///
>    (mean if hetreatall==3) (diff hetreat3 if hetreatall!=1 & hetreatall!=2 ) ///
>   female white age children  bornuk collegegraduate unemployed incometsd incomeimp conservative brexiteer  tenyearmigrationpct using "balancetable2.tex", replace
{res}{txt}(note: file balancetable2.tex not found)

{com}. 
. 
.   
.   
.          * Table A3 (no covariates)
.          eststo clear
{txt}
{com}.   foreach var of global outcvariables  {c -(}
{txt}  2{com}.   quietly reg `var' heforeigntreat   , r
{txt}  3{com}.   eststo `var'1
{txt}  4{com}.   
.  quietly  reg `var' heforeigntreat  hetreat2  hetreat3 , r
{txt}  5{com}.   eststo `var'2
{txt}  6{com}.  
.  {c )-}
{txt}
{com}. 
.    esttab capforeignstudents1 capforeignstudents2 ,  noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{txt}Foreign students    {res}       0.0801**        0.0251   {txt}
                    {res} {ralign 12:{txt:(}0.0243{txt:)}}    {ralign 12:{txt:(}0.0315{txt:)}}   {txt}

{txt}Crowdout            {res}                       0.0874** {txt}
                    {res}                 {ralign 12:{txt:(}0.0269{txt:)}}   {txt}

{txt}Brain Drain         {res}                       0.0502+  {txt}
                    {res}                 {ralign 12:{txt:(}0.0271{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         3000            3000   {txt}
{txt}R-squared           {res}        0.004           0.007   {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}. 
.  
. ///Tex:  esttab capforeignstudents1 capforeignstudents2  using "App Table A3 No covariates.tex",  noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
> 
.   
.   
. 
.  ******** Table A4 (probit)
.    eststo clear
{txt}
{com}.  
.   quietly probit capforeignstudents heforeigntreat   $indivcontrols, r
{txt}
{com}.   eststo capforeignstudents1
{txt}
{com}.   
.  quietly  probit capforeignstudents heforeigntreat  hetreat2  hetreat3 $indivcontrols, r
{txt}
{com}.   eststo capforeignstudents2
{txt}
{com}.  
.  
.   esttab capforeignstudents1 capforeignstudents2  , drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{res}Cap on foreign stu~s                                {txt}
{txt}Foreign students    {res}        0.225***       0.0852   {txt}
                    {res} {ralign 12:{txt:(}0.0630{txt:)}}    {ralign 12:{txt:(}0.0812{txt:)}}   {txt}

{txt}Crowdout            {res}                        0.242***{txt}
                    {res}                 {ralign 12:{txt:(}0.0711{txt:)}}   {txt}

{txt}Brain Drain         {res}                        0.111   {txt}
                    {res}                 {ralign 12:{txt:(}0.0706{txt:)}}   {txt}

{txt}Constant            {res}       -0.405**        -0.400** {txt}
                    {res} {ralign 12:{txt:(}0.142{txt:)}}    {ralign 12:{txt:(}0.142{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         3000            3000   {txt}
{txt}R-squared           {res}                                {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.     
.         
.  ///Tex: esttab capforeignstudents1 capforeignstudents2  using "App Table 1 LPM.tex", drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>     
.         
. 
.   
.   
.   ***Table A5 Post stratification weights
.                   eststo clear
{txt}
{com}.    foreach var of global outcvariables  {c -(}
{txt}  2{com}.   quietly reg `var' heforeigntreat   $indivcontrols [iw=unemployweight], r
{txt}  3{com}.   eststo `var'1
{txt}  4{com}.   
.  quietly  reg `var' heforeigntreat  hetreat2  hetreat3 $indivcontrols [iw=unemployweight], r
{txt}  5{com}.   eststo `var'2
{txt}  6{com}.  
.  {c )-}
{txt}
{com}. 
.  
.    esttab capforeignstudents1 capforeignstudents2  , drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{txt}Foreign students    {res}       0.0810***       0.0271   {txt}
                    {res} {ralign 12:{txt:(}0.0244{txt:)}}    {ralign 12:{txt:(}0.0313{txt:)}}   {txt}

{txt}Crowdout            {res}                       0.0901***{txt}
                    {res}                 {ralign 12:{txt:(}0.0267{txt:)}}   {txt}

{txt}Brain Drain         {res}                       0.0447+  {txt}
                    {res}                 {ralign 12:{txt:(}0.0267{txt:)}}   {txt}

{txt}Constant            {res}        0.344***        0.347***{txt}
                    {res} {ralign 12:{txt:(}0.0551{txt:)}}    {ralign 12:{txt:(}0.0549{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         3000            3000   {txt}
{txt}R-squared           {res}        0.077           0.081   {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.                 
.  ///Tex: esttab capforeignstudents1 capforeignstudents2  using "Table PostWeights.tex", drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>                 
.         
. 
.   
. 
. ****** Table A6 (with context and political covariates)
. global addedvariables  brexiteer brexitneutral conservative tenyearmigrationpct
{txt}
{com}.                   eststo clear
{txt}
{com}.    foreach var of global outcvariables  {c -(}
{txt}  2{com}.   quietly reg `var' heforeigntreat   $indivcontrols $addedvariables, r
{txt}  3{com}.   eststo `var'1
{txt}  4{com}.   
.  quietly  reg `var' heforeigntreat  hetreat2  hetreat3 $indivcontrols $addedvariables, r
{txt}  5{com}.   eststo `var'2
{txt}  6{com}.  
.  {c )-}
{txt}
{com}.  
.  
.   esttab capforeignstudents1 capforeignstudents2 , drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{txt}Foreign students    {res}       0.0908***       0.0422   {txt}
                    {res} {ralign 12:{txt:(}0.0245{txt:)}}    {ralign 12:{txt:(}0.0316{txt:)}}   {txt}

{txt}Brexiteer           {res}        0.213***        0.213***{txt}
                    {res} {ralign 12:{txt:(}0.0203{txt:)}}    {ralign 12:{txt:(}0.0203{txt:)}}   {txt}

{txt}brexitneutral       {res}        0.116***        0.115***{txt}
                    {res} {ralign 12:{txt:(}0.0311{txt:)}}    {ralign 12:{txt:(}0.0310{txt:)}}   {txt}

{txt}Conservative party  {res}       0.0127          0.0124   {txt}
                    {res} {ralign 12:{txt:(}0.0211{txt:)}}    {ralign 12:{txt:(}0.0211{txt:)}}   {txt}

{txt}Ten year migration~t{res}      0.00308         0.00461   {txt}
                    {res} {ralign 12:{txt:(}0.0915{txt:)}}    {ralign 12:{txt:(}0.0911{txt:)}}   {txt}

{txt}Crowdout            {res}                       0.0860** {txt}
                    {res}                 {ralign 12:{txt:(}0.0269{txt:)}}   {txt}

{txt}Brain Drain         {res}                       0.0356   {txt}
                    {res}                 {ralign 12:{txt:(}0.0268{txt:)}}   {txt}

{txt}Constant            {res}        0.305***        0.306***{txt}
                    {res} {ralign 12:{txt:(}0.0612{txt:)}}    {ralign 12:{txt:(}0.0609{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         2704            2704   {txt}
{txt}R-squared           {res}        0.109           0.113   {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.   
.   
. ///Tex:  esttab capforeignstudents1 capforeignstudents2  using "Table 1polvars.tex", drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace 
> 
.   
.   
.   
.  *******Table A7 Total effects
.   reg capforeignstudents hetreat1 hetreat2 hetreat3 $indivcontrols, r

{txt}Linear regression                               Number of obs     = {res}     3,000
                                                {txt}F(12, 2987)       =  {res}    25.40
                                                {txt}Prob > F          = {res}    0.0000
                                                {txt}R-squared         = {res}    0.0825
                                                {txt}Root MSE          =    {res} .47073

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}capforeig~ts{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 4}hetreat1 {c |}{col 14}{res}{space 2} .0316874{col 26}{space 2} .0302733{col 37}{space 1}    1.05{col 46}{space 3}0.295{col 54}{space 4}-.0276713{col 67}{space 3} .0910461
{txt}{space 4}hetreat2 {c |}{col 14}{res}{space 2} .1189295{col 26}{space 2} .0259637{col 37}{space 1}    4.58{col 46}{space 3}0.000{col 54}{space 4} .0680208{col 67}{space 3} .1698381
{txt}{space 4}hetreat3 {c |}{col 14}{res}{space 2} .0720546{col 26}{space 2} .0260003{col 37}{space 1}    2.77{col 46}{space 3}0.006{col 54}{space 4} .0210742{col 67}{space 3}  .123035
{txt}{space 6}female {c |}{col 14}{res}{space 2} .1188712{col 26}{space 2} .0179966{col 37}{space 1}    6.61{col 46}{space 3}0.000{col 54}{space 4} .0835842{col 67}{space 3} .1541583
{txt}{space 9}age {c |}{col 14}{res}{space 2} .0008062{col 26}{space 2} .0005896{col 37}{space 1}    1.37{col 46}{space 3}0.172{col 54}{space 4}-.0003499{col 67}{space 3} .0019623
{txt}{space 4}children {c |}{col 14}{res}{space 2} .1097565{col 26}{space 2} .0189869{col 37}{space 1}    5.78{col 46}{space 3}0.000{col 54}{space 4} .0725278{col 67}{space 3} .1469853
{txt}{space 7}white {c |}{col 14}{res}{space 2} .0886226{col 26}{space 2}   .03283{col 37}{space 1}    2.70{col 46}{space 3}0.007{col 54}{space 4} .0242509{col 67}{space 3} .1529943
{txt}{space 6}bornuk {c |}{col 14}{res}{space 2} .0540217{col 26}{space 2} .0357485{col 37}{space 1}    1.51{col 46}{space 3}0.131{col 54}{space 4}-.0160725{col 67}{space 3} .1241159
{txt}{space 1}somecollege {c |}{col 14}{res}{space 2} -.159877{col 26}{space 2} .0187105{col 37}{space 1}   -8.54{col 46}{space 3}0.000{col 54}{space 4}-.1965638{col 67}{space 3}-.1231901
{txt}{space 2}unemployed {c |}{col 14}{res}{space 2}-.0385537{col 26}{space 2} .0202981{col 37}{space 1}   -1.90{col 46}{space 3}0.058{col 54}{space 4}-.0783534{col 67}{space 3} .0012459
{txt}{space 3}incometsd {c |}{col 14}{res}{space 2}-.0010917{col 26}{space 2} .0004071{col 37}{space 1}   -2.68{col 46}{space 3}0.007{col 54}{space 4}-.0018899{col 67}{space 3}-.0002935
{txt}{space 3}incomeimp {c |}{col 14}{res}{space 2} .0188108{col 26}{space 2} .0347561{col 37}{space 1}    0.54{col 46}{space 3}0.588{col 54}{space 4}-.0493376{col 67}{space 3} .0869592
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3551465{col 26}{space 2} .0529444{col 37}{space 1}    6.71{col 46}{space 3}0.000{col 54}{space 4} .2513352{col 67}{space 3} .4589577
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.   eststo totaleffects
{txt}
{com}.   
.   reg capforeignstudents controlgroup hetreat1 hetreat3  $indivcontrols, r

{txt}Linear regression                               Number of obs     = {res}     3,000
                                                {txt}F(12, 2987)       =  {res}    25.40
                                                {txt}Prob > F          = {res}    0.0000
                                                {txt}R-squared         = {res}    0.0825
                                                {txt}Root MSE          =    {res} .47073

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}capforeig~ts{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
controlgroup {c |}{col 14}{res}{space 2}-.1189295{col 26}{space 2} .0259637{col 37}{space 1}   -4.58{col 46}{space 3}0.000{col 54}{space 4}-.1698381{col 67}{space 3}-.0680208
{txt}{space 4}hetreat1 {c |}{col 14}{res}{space 2}-.0872421{col 26}{space 2} .0260074{col 37}{space 1}   -3.35{col 46}{space 3}0.001{col 54}{space 4}-.1382364{col 67}{space 3}-.0362478
{txt}{space 4}hetreat3 {c |}{col 14}{res}{space 2}-.0468749{col 26}{space 2} .0208902{col 37}{space 1}   -2.24{col 46}{space 3}0.025{col 54}{space 4}-.0878356{col 67}{space 3}-.0059141
{txt}{space 6}female {c |}{col 14}{res}{space 2} .1188712{col 26}{space 2} .0179966{col 37}{space 1}    6.61{col 46}{space 3}0.000{col 54}{space 4} .0835842{col 67}{space 3} .1541583
{txt}{space 9}age {c |}{col 14}{res}{space 2} .0008062{col 26}{space 2} .0005896{col 37}{space 1}    1.37{col 46}{space 3}0.172{col 54}{space 4}-.0003499{col 67}{space 3} .0019623
{txt}{space 4}children {c |}{col 14}{res}{space 2} .1097565{col 26}{space 2} .0189869{col 37}{space 1}    5.78{col 46}{space 3}0.000{col 54}{space 4} .0725278{col 67}{space 3} .1469853
{txt}{space 7}white {c |}{col 14}{res}{space 2} .0886226{col 26}{space 2}   .03283{col 37}{space 1}    2.70{col 46}{space 3}0.007{col 54}{space 4} .0242509{col 67}{space 3} .1529943
{txt}{space 6}bornuk {c |}{col 14}{res}{space 2} .0540217{col 26}{space 2} .0357485{col 37}{space 1}    1.51{col 46}{space 3}0.131{col 54}{space 4}-.0160725{col 67}{space 3} .1241159
{txt}{space 1}somecollege {c |}{col 14}{res}{space 2} -.159877{col 26}{space 2} .0187105{col 37}{space 1}   -8.54{col 46}{space 3}0.000{col 54}{space 4}-.1965638{col 67}{space 3}-.1231901
{txt}{space 2}unemployed {c |}{col 14}{res}{space 2}-.0385537{col 26}{space 2} .0202981{col 37}{space 1}   -1.90{col 46}{space 3}0.058{col 54}{space 4}-.0783534{col 67}{space 3} .0012459
{txt}{space 3}incometsd {c |}{col 14}{res}{space 2}-.0010917{col 26}{space 2} .0004071{col 37}{space 1}   -2.68{col 46}{space 3}0.007{col 54}{space 4}-.0018899{col 67}{space 3}-.0002935
{txt}{space 3}incomeimp {c |}{col 14}{res}{space 2} .0188108{col 26}{space 2} .0347561{col 37}{space 1}    0.54{col 46}{space 3}0.588{col 54}{space 4}-.0493376{col 67}{space 3} .0869592
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .4740759{col 26}{space 2} .0509873{col 37}{space 1}    9.30{col 46}{space 3}0.000{col 54}{space 4} .3741021{col 67}{space 3} .5740497
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.   eststo comparemarginals
{txt}
{com}.    
.   
.      esttab totaleffects comparemarginals  , title("Support for cap on foreign students, total effects by treatment group") drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) append
{res}
{txt}Support for cap on foreign students, total effects by treatment group
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{txt}Foreign students    {res}       0.0317         -0.0872***{txt}
                    {res} {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}   {txt}

{txt}Crowdout            {res}        0.119***                {txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}                   {txt}

{txt}Brain Drain         {res}       0.0721**       -0.0469*  {txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0209{txt:)}}   {txt}

{txt}No primes           {res}                       -0.119***{txt}
                    {res}                 {ralign 12:{txt:(}0.0260{txt:)}}   {txt}

{txt}Constant            {res}        0.355***        0.474***{txt}
                    {res} {ralign 12:{txt:(}0.0529{txt:)}}    {ralign 12:{txt:(}0.0510{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         3000            3000   {txt}
{txt}R-squared           {res}        0.083           0.083   {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.  
.   
.   
.   
.  ///Tex: esttab totaleffects comparemarginals   using "Totaleffects.tex", title("Support for cap on foreign students, total effects by treatment group") drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) append
>  
.   
.  ******Table A8 (STEM and culturally distant)
.   eststo clear
{txt}
{com}.   
.    foreach var of global outcvariables  {c -(}
{txt}  2{com}.   quietly reg `var' heforeigntreat  hetreat2  hetreat3 $indivcontrols, r
{txt}  3{com}.   eststo `var'
{txt}  4{com}.   
.   quietly reg `var' heforeigntreat hetreat2 hetreat2distant hetreat3 hetreat3highva   $indivcontrols, r
{txt}  5{com}.   eststo `var'inter
{txt}  6{com}.   {c )-}
{txt}
{com}.   
.   esttab capforeignstudents capforeignstudentsinter , drop( female age children white bornuk somecollege unemployed incometsd incomeimp ) noconstant noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) append
{res}
{txt}{hline 52}
{txt}                              (1)             (2)   
{txt}                     Cap on for~s    Cap on for~s   
{txt}{hline 52}
{txt}Foreign students    {res}       0.0317          0.0317   {txt}
                    {res} {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}   {txt}

{txt}Crowdout            {res}       0.0872***       0.0860** {txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0297{txt:)}}   {txt}

{txt}Brain Drain         {res}       0.0404          0.0474   {txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0300{txt:)}}   {txt}

{txt}Culturally Distant  {res}                      0.00246   {txt}
                    {res}                 {ralign 12:{txt:(}0.0296{txt:)}}   {txt}

{txt}High VA degrees     {res}                      -0.0140   {txt}
                    {res}                 {ralign 12:{txt:(}0.0296{txt:)}}   {txt}

{txt}Constant            {res}        0.355***        0.355***{txt}
                    {res} {ralign 12:{txt:(}0.0529{txt:)}}    {ralign 12:{txt:(}0.0529{txt:)}}   {txt}
{txt}{hline 52}
{txt}Observations        {res}         3000            3000   {txt}
{txt}R-squared           {res}        0.083           0.083   {txt}
{txt}{hline 52}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.   
.   
.  ///Tex: esttab capforeignstudents1 capforeignstudentsinter using "effectallvariablescontrol4.tex", drop( ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) append
> 
. 
.   
.    
.    ********Table A9  (Crowdout analysis by subgroup)
.    
.    eststo clear
{txt}
{com}.    
.    foreach var in female  white children bornuk collegegraduate unemployed  conservative brexiteer {c -(}
{txt}  2{com}.              quietly reg capforeignstudents hetreat2##`var' bornuk white children female age  somecollege       incometsd incomeimp        hetreat3 controlgroup, r
{txt}  3{com}.         
.         eststo
{txt}  4{com}.    {c )-}
{txt}({res}est1{txt} stored)
({res}est2{txt} stored)
({res}est3{txt} stored)
({res}est4{txt} stored)
({res}est5{txt} stored)
({res}est6{txt} stored)
({res}est7{txt} stored)
({res}est8{txt} stored)

{com}.    
.    
.      quietly reg capforeignstudents c.hetreat2##c.age bornuk white children female age  somecollege       incometsd incomeimp       hetreat3 controlgroup, r
{txt}
{com}.         eststo
{txt}({res}est9{txt} stored)

{com}.    
.    quietly reg capforeignstudents c.hetreat2##c.incometsd bornuk white children female age  somecollege       incometsd incomeimp         hetreat3 controlgroup, r
{txt}
{com}.         eststo
{txt}({res}est10{txt} stored)

{com}.         
.            quietly reg capforeignstudents c.hetreat2##c.tenyearmigrationpct bornuk white children female age  somecollege       incometsd incomeimp      hetreat3 controlgroup, r
{txt}
{com}.         eststo
{txt}({res}est11{txt} stored)

{com}. 
.         
.           esttab est1 est2 est3 est4 est5 est6 , drop( ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 116}
{txt}                              (1)             (2)             (3)             (4)             (5)             (6)   
{txt}                     Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s   
{txt}{hline 116}
{txt}0b.Crowdout         {res}            0               0               0               0               0               0   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1.Crowdout          {res}        0.113***        0.185**         0.113**        0.0966          0.0914**        0.0860** {txt}
                    {res} {ralign 12:{txt:(}0.0323{txt:)}}    {ralign 12:{txt:(}0.0649{txt:)}}    {ralign 12:{txt:(}0.0356{txt:)}}    {ralign 12:{txt:(}0.0725{txt:)}}    {ralign 12:{txt:(}0.0290{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}   {txt}

{txt}0b.female           {res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}1.female            {res}        0.133***                                                                                {txt}
                    {res} {ralign 12:{txt:(}0.0218{txt:)}}                                                                                   {txt}

{txt}0b.hetreat2#0b.fem~e{res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}0b.hetreat2#1o.fem~e{res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}1o.hetreat2#0b.fem~e{res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}1.hetreat2#1.female {res}      -0.0527                                                                                   {txt}
                    {res} {ralign 12:{txt:(}0.0364{txt:)}}                                                                                   {txt}

{txt}UK Native           {res}       0.0502          0.0538          0.0526                          0.0535          0.0540   {txt}
                    {res} {ralign 12:{txt:(}0.0357{txt:)}}    {ralign 12:{txt:(}0.0356{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}                    {ralign 12:{txt:(}0.0355{txt:)}}    {ralign 12:{txt:(}0.0358{txt:)}}   {txt}

{txt}White               {res}       0.0908**                        0.0890**        0.0894**        0.0868**        0.0886** {txt}
                    {res} {ralign 12:{txt:(}0.0330{txt:)}}                    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0328{txt:)}}   {txt}

{txt}children            {res}        0.113***        0.113***                        0.113***        0.113***        0.110***{txt}
                    {res} {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}                    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0190{txt:)}}   {txt}

{txt}o.female            {res}            0           0.116***        0.115***        0.115***        0.114***        0.119***{txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0180{txt:)}}   {txt}

{txt}age                 {res}     0.000314        0.000310        0.000305        0.000310        0.000323        0.000807   {txt}
                    {res} {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000590{txt:)}}   {txt}

{txt}somecollege         {res}       -0.157***       -0.157***       -0.157***       -0.157***       -0.103**        -0.160***{txt}
                    {res} {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0326{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}   {txt}

{txt}incometsd           {res}    -0.000912*      -0.000931*      -0.000915*      -0.000908*      -0.000804*       -0.00109** {txt}
                    {res} {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000398{txt:)}}    {ralign 12:{txt:(}0.000407{txt:)}}   {txt}

{txt}incomeimp           {res}       0.0182          0.0168          0.0187          0.0193          0.0226          0.0188   {txt}
                    {res} {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0348{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0348{txt:)}}   {txt}

{txt}Brain Drain         {res}       0.0386          0.0393          0.0388          0.0393          0.0405          0.0404   {txt}
                    {res} {ralign 12:{txt:(}0.0261{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0261{txt:)}}   {txt}

{txt}No primes           {res}      -0.0328         -0.0319         -0.0327         -0.0322         -0.0327         -0.0317   {txt}
                    {res} {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}   {txt}

{txt}0b.White            {res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.White             {res}                        0.123**                                                                 {txt}
                    {res}                 {ralign 12:{txt:(}0.0394{txt:)}}                                                                   {txt}

{txt}0b.hetreat2#0b.white{res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}0b.hetreat2#1o.white{res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1o.hetreat2#0b.white{res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.hetreat2#1.white  {res}                       -0.108+                                                                  {txt}
                    {res}                 {ralign 12:{txt:(}0.0652{txt:)}}                                                                   {txt}

{txt}o.White             {res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}0b.children         {res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.children          {res}                                        0.128***                                                {txt}
                    {res}                                 {ralign 12:{txt:(}0.0229{txt:)}}                                                   {txt}

{txt}0b.hetreat2#0b.chi~n{res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}0b.hetreat2#1o.chi~n{res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1o.hetreat2#0b.chi~n{res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.hetreat2#1.child~n{res}                                      -0.0432                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}0.0379{txt:)}}                                                   {txt}

{txt}o.children          {res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}0b.UK Native        {res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}1.UK Native         {res}                                                       0.0562                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.0435{txt:)}}                                   {txt}

{txt}0b.hetreat2#0b.bor~k{res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}0b.hetreat2#1o.bor~k{res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}1o.hetreat2#0b.bor~k{res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}1.hetreat2#1.bornuk {res}                                                      -0.0107                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.0725{txt:)}}                                   {txt}

{txt}o.UK Native         {res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}0b.collegegraduate  {res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}1.collegegraduate   {res}                                                                      -0.0664+                  {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.0364{txt:)}}                   {txt}

{txt}0b.hetreat2#0b.col~e{res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}0b.hetreat2#1o.col~e{res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}1o.hetreat2#0b.col~e{res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}1.hetreat2#1.colle~e{res}                                                                     -0.00843                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.0384{txt:)}}                   {txt}

{txt}0b.unemployed       {res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1.unemployed        {res}                                                                                      -0.0396+  {txt}
                    {res}                                                                                 {ralign 12:{txt:(}0.0239{txt:)}}   {txt}

{txt}0b.hetreat2#0b.une~d{res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}0b.hetreat2#1o.une~d{res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1o.hetreat2#0b.une~d{res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1.hetreat2#1.unemp~d{res}                                                                                      0.00298   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}0.0366{txt:)}}   {txt}

{txt}Constant            {res}        0.379***        0.356***        0.379***        0.384***        0.384***        0.387***{txt}
                    {res} {ralign 12:{txt:(}0.0531{txt:)}}    {ralign 12:{txt:(}0.0561{txt:)}}    {ralign 12:{txt:(}0.0532{txt:)}}    {ralign 12:{txt:(}0.0574{txt:)}}    {ralign 12:{txt:(}0.0530{txt:)}}    {ralign 12:{txt:(}0.0530{txt:)}}   {txt}
{txt}{hline 116}
{txt}Observations        {res}         3000            3000            3000            3000            3000            3000   {txt}
{txt}R-squared           {res}        0.082           0.082           0.082           0.081           0.083           0.083   {txt}
{txt}{hline 116}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.   
.     esttab est7 est8 est9 est10 est11   , drop(  ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 100}
{txt}                              (1)             (2)             (3)             (4)             (5)   
{txt}                     Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s   
{txt}{hline 100}
{txt}0b.Crowdout         {res}            0               0                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.Crowdout          {res}       0.0894**         0.101***                                                {txt}
                    {res} {ralign 12:{txt:(}0.0286{txt:)}}    {ralign 12:{txt:(}0.0306{txt:)}}                                                   {txt}

{txt}Crowdout            {res}                                       0.0529          0.0622+         0.0557   {txt}
                    {res}                                 {ralign 12:{txt:(}0.0556{txt:)}}    {ralign 12:{txt:(}0.0346{txt:)}}    {ralign 12:{txt:(}0.0355{txt:)}}   {txt}

{txt}0b.Conservative pa~y{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.Conservative party{res}       0.0619*                                                                  {txt}
                    {res} {ralign 12:{txt:(}0.0242{txt:)}}                                                                   {txt}

{txt}0b.hetreat2#0b.con~e{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}0b.hetreat2#1o.con~e{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1o.hetreat2#0b.con~e{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.hetreat2#1.conse~e{res}     -0.00567                                                                   {txt}
                    {res} {ralign 12:{txt:(}0.0398{txt:)}}                                                                   {txt}

{txt}UK Native           {res}       0.0535          0.0353          0.0529          0.0511          0.0378   {txt}
                    {res} {ralign 12:{txt:(}0.0357{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}    {ralign 12:{txt:(}0.0358{txt:)}}    {ralign 12:{txt:(}0.0389{txt:)}}   {txt}

{txt}White               {res}       0.0869**        0.0800*         0.0896**        0.0901**        0.0649+  {txt}
                    {res} {ralign 12:{txt:(}0.0330{txt:)}}    {ralign 12:{txt:(}0.0326{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}   {txt}

{txt}children            {res}        0.115***       0.0994***        0.113***        0.113***        0.112***{txt}
                    {res} {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0201{txt:)}}   {txt}

{txt}female              {res}        0.117***        0.117***        0.115***        0.115***        0.107***{txt}
                    {res} {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0175{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}   {txt}

{txt}age                 {res}    -0.000110       -0.000605       0.0000700        0.000313        0.000247   {txt}
                    {res} {ralign 12:{txt:(}0.000555{txt:)}}    {ralign 12:{txt:(}0.000535{txt:)}}    {ralign 12:{txt:(}0.000642{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000561{txt:)}}   {txt}

{txt}somecollege         {res}       -0.156***       -0.126***       -0.157***       -0.157***       -0.158***{txt}
                    {res} {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0186{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0198{txt:)}}   {txt}

{txt}incometsd           {res}     -0.00111**     -0.000774*      -0.000905*       -0.00118*      -0.000840*  {txt}
                    {res} {ralign 12:{txt:(}0.000400{txt:)}}    {ralign 12:{txt:(}0.000391{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000469{txt:)}}    {ralign 12:{txt:(}0.000424{txt:)}}   {txt}

{txt}incomeimp           {res}       0.0132          0.0155          0.0198          0.0194          0.0278   {txt}
                    {res} {ralign 12:{txt:(}0.0350{txt:)}}    {ralign 12:{txt:(}0.0342{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0364{txt:)}}   {txt}

{txt}Brain Drain         {res}       0.0411          0.0429+         0.0393          0.0394          0.0350   {txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0253{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0276{txt:)}}   {txt}

{txt}No primes           {res}      -0.0296         -0.0415         -0.0321         -0.0321         -0.0336   {txt}
                    {res} {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0296{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0321{txt:)}}   {txt}

{txt}0b.Brexiteer        {res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.Brexiteer         {res}                        0.204***                                                {txt}
                    {res}                 {ralign 12:{txt:(}0.0216{txt:)}}                                                   {txt}

{txt}0b.hetreat2#0b.bre~r{res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}0b.hetreat2#1o.bre~r{res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1o.hetreat2#0b.bre~r{res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.hetreat2#1.brexi~r{res}                      -0.0280                                                   {txt}
                    {res}                 {ralign 12:{txt:(}0.0354{txt:)}}                                                   {txt}

{txt}c.hetreat2#c.age    {res}                                     0.000725                                   {txt}
                    {res}                                 {ralign 12:{txt:(}0.00104{txt:)}}                                   {txt}

{txt}o.age               {res}                                            0                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}c.hetreat2#c.incom~d{res}                                                     0.000754                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.000715{txt:)}}                   {txt}

{txt}o.incometsd         {res}                                                            0                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}Ten year migration~t{res}                                                                      -0.0710   {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.111{txt:)}}   {txt}

{txt}c.hetreat2#c.tenye~t{res}                                                                        0.246   {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.190{txt:)}}   {txt}

{txt}Constant            {res}        0.393***        0.355***        0.398***        0.396***        0.441***{txt}
                    {res} {ralign 12:{txt:(}0.0532{txt:)}}    {ralign 12:{txt:(}0.0520{txt:)}}    {ralign 12:{txt:(}0.0549{txt:)}}    {ralign 12:{txt:(}0.0536{txt:)}}    {ralign 12:{txt:(}0.0609{txt:)}}   {txt}
{txt}{hline 100}
{txt}Observations        {res}         3000            3000            3000            3000            2704   {txt}
{txt}R-squared           {res}        0.084           0.117           0.082           0.082           0.073   {txt}
{txt}{hline 100}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.         
. ///Tex:  esttab est1 est2 est3 est4 est5 est6 using "CrowdoutOLSSubgroups.tex", drop( ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>   
.  ///Tex:   esttab est7 est8 est9 est10 est11   using "CrowdoutOLS2Subgroups2.tex", drop(  ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>                 
.                 
.         *******Table A10 for HC flight analysis by subgroup     
.                 
.    eststo clear
{txt}
{com}.    foreach var in female  white children bornuk collegegraduate unemployed  conservative brexiteer {c -(}
{txt}  2{com}.              quietly reg capforeignstudents hetreat3##`var' bornuk white children female age  somecollege       incometsd incomeimp         hetreat2 controlgroup , r
{txt}  3{com}.         
.         eststo
{txt}  4{com}.    {c )-}
{txt}({res}est1{txt} stored)
({res}est2{txt} stored)
({res}est3{txt} stored)
({res}est4{txt} stored)
({res}est5{txt} stored)
({res}est6{txt} stored)
({res}est7{txt} stored)
({res}est8{txt} stored)

{com}.    
.    
.      quietly reg capforeignstudents c.hetreat3##c.age bornuk white children female age  somecollege       incometsd incomeimp         hetreat2 controlgroup , r
{txt}
{com}.         eststo
{txt}({res}est9{txt} stored)

{com}.    
.    quietly reg capforeignstudents c.hetreat3##c.incometsd bornuk white children female age  somecollege       incometsd incomeimp         hetreat2 controlgroup , r
{txt}
{com}.         eststo
{txt}({res}est10{txt} stored)

{com}.         
.            quietly reg capforeignstudents c.hetreat3##c.tenyearmigrationpct bornuk white children female age  somecollege       incometsd incomeimp        hetreat2 controlgroup , r
{txt}
{com}.         eststo
{txt}({res}est11{txt} stored)

{com}. 
.         
.           esttab est1 est2 est3 est4 est5 est6, drop( ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 116}
{txt}                              (1)             (2)             (3)             (4)             (5)             (6)   
{txt}                     Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s   
{txt}{hline 116}
{txt}0b.Brain Drain      {res}            0               0               0               0               0               0   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1.Brain Drain       {res}       0.0147          0.0449          0.0356          0.0248          0.0331          0.0475   {txt}
                    {res} {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0663{txt:)}}    {ralign 12:{txt:(}0.0356{txt:)}}    {ralign 12:{txt:(}0.0741{txt:)}}    {ralign 12:{txt:(}0.0291{txt:)}}    {ralign 12:{txt:(}0.0306{txt:)}}   {txt}

{txt}0b.female           {res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}1.female            {res}       0.0993***                                                                                {txt}
                    {res} {ralign 12:{txt:(}0.0217{txt:)}}                                                                                   {txt}

{txt}0b.hetreat3#0b.fem~e{res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}0b.hetreat3#1o.fem~e{res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}1o.hetreat3#0b.fem~e{res}            0                                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                                   {txt}

{txt}1.hetreat3#1.female {res}       0.0473                                                                                   {txt}
                    {res} {ralign 12:{txt:(}0.0365{txt:)}}                                                                                   {txt}

{txt}UK Native           {res}       0.0525          0.0524          0.0526                          0.0536          0.0539   {txt}
                    {res} {ralign 12:{txt:(}0.0356{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}                    {ralign 12:{txt:(}0.0355{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}   {txt}

{txt}White               {res}       0.0888**                        0.0894**        0.0897**        0.0867**        0.0884** {txt}
                    {res} {ralign 12:{txt:(}0.0329{txt:)}}                    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0328{txt:)}}    {ralign 12:{txt:(}0.0328{txt:)}}   {txt}

{txt}children            {res}        0.113***        0.113***                        0.113***        0.113***        0.110***{txt}
                    {res} {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}                    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0190{txt:)}}   {txt}

{txt}o.female            {res}            0           0.115***        0.115***        0.115***        0.114***        0.119***{txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0180{txt:)}}   {txt}

{txt}age                 {res}     0.000313        0.000312        0.000313        0.000308        0.000322        0.000808   {txt}
                    {res} {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000590{txt:)}}   {txt}

{txt}somecollege         {res}       -0.157***       -0.157***       -0.157***       -0.157***       -0.103**        -0.160***{txt}
                    {res} {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0326{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}   {txt}

{txt}incometsd           {res}    -0.000908*      -0.000910*      -0.000909*      -0.000906*      -0.000808*       -0.00110** {txt}
                    {res} {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000398{txt:)}}    {ralign 12:{txt:(}0.000407{txt:)}}   {txt}

{txt}incomeimp           {res}       0.0199          0.0193          0.0195          0.0193          0.0224          0.0185   {txt}
                    {res} {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0348{txt:)}}   {txt}

{txt}Crowdout            {res}       0.0867***       0.0866***       0.0867***       0.0866***       0.0884***       0.0872***{txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}   {txt}

{txt}No primes           {res}      -0.0318         -0.0322         -0.0322         -0.0323         -0.0330         -0.0318   {txt}
                    {res} {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}   {txt}

{txt}0b.White            {res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.White             {res}                       0.0914*                                                                  {txt}
                    {res}                 {ralign 12:{txt:(}0.0390{txt:)}}                                                                   {txt}

{txt}0b.hetreat3#0b.white{res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}0b.hetreat3#1o.white{res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1o.hetreat3#0b.white{res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.hetreat3#1.white  {res}                     -0.00613                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}0.0666{txt:)}}                                                                   {txt}

{txt}o.White             {res}                            0                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}0b.children         {res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.children          {res}                                        0.111***                                                {txt}
                    {res}                                 {ralign 12:{txt:(}0.0228{txt:)}}                                                   {txt}

{txt}0b.hetreat3#0b.chi~n{res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}0b.hetreat3#1o.chi~n{res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1o.hetreat3#0b.chi~n{res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.hetreat3#1.child~n{res}                                      0.00602                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}0.0380{txt:)}}                                                   {txt}

{txt}o.children          {res}                                            0                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}0b.UK Native        {res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}1.UK Native         {res}                                                       0.0475                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.0428{txt:)}}                                   {txt}

{txt}0b.hetreat3#0b.bor~k{res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}0b.hetreat3#1o.bor~k{res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}1o.hetreat3#0b.bor~k{res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}1.hetreat3#1.bornuk {res}                                                       0.0156                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.0741{txt:)}}                                   {txt}

{txt}o.UK Native         {res}                                                            0                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}0b.collegegraduate  {res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}1.collegegraduate   {res}                                                                      -0.0758*                  {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.0362{txt:)}}                   {txt}

{txt}0b.hetreat3#0b.col~e{res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}0b.hetreat3#1o.col~e{res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}1o.hetreat3#0b.col~e{res}                                                                            0                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}1.hetreat3#1.colle~e{res}                                                                       0.0208                   {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.0386{txt:)}}                   {txt}

{txt}0b.unemployed       {res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1.unemployed        {res}                                                                                      -0.0331   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}0.0238{txt:)}}   {txt}

{txt}0b.hetreat3#0b.une~d{res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}0b.hetreat3#1o.une~d{res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1o.hetreat3#0b.une~d{res}                                                                                            0   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}.{txt:)}}   {txt}

{txt}1.hetreat3#1.unemp~d{res}                                                                                      -0.0164   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}0.0365{txt:)}}   {txt}

{txt}Constant            {res}        0.395***        0.385***        0.388***        0.392***        0.387***        0.385***{txt}
                    {res} {ralign 12:{txt:(}0.0532{txt:)}}    {ralign 12:{txt:(}0.0557{txt:)}}    {ralign 12:{txt:(}0.0534{txt:)}}    {ralign 12:{txt:(}0.0567{txt:)}}    {ralign 12:{txt:(}0.0529{txt:)}}    {ralign 12:{txt:(}0.0530{txt:)}}   {txt}
{txt}{hline 116}
{txt}Observations        {res}         3000            3000            3000            3000            3000            3000   {txt}
{txt}R-squared           {res}        0.082           0.081           0.081           0.081           0.083           0.083   {txt}
{txt}{hline 116}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.   
.     esttab est7 est8 est9 est10 est11  , drop(  ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
{res}
{txt}{hline 100}
{txt}                              (1)             (2)             (3)             (4)             (5)   
{txt}                     Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s    Cap on for~s   
{txt}{hline 100}
{txt}0b.Brain Drain      {res}            0               0                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}    {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.Brain Drain       {res}       0.0382          0.0439                                                   {txt}
                    {res} {ralign 12:{txt:(}0.0284{txt:)}}    {ralign 12:{txt:(}0.0302{txt:)}}                                                   {txt}

{txt}Brain Drain         {res}                                        0.137*         0.0708*         0.0530   {txt}
                    {res}                                 {ralign 12:{txt:(}0.0548{txt:)}}    {ralign 12:{txt:(}0.0346{txt:)}}    {ralign 12:{txt:(}0.0351{txt:)}}   {txt}

{txt}0b.Conservative pa~y{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.Conservative party{res}       0.0567*                                                                  {txt}
                    {res} {ralign 12:{txt:(}0.0240{txt:)}}                                                                   {txt}

{txt}0b.hetreat3#0b.con~e{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}0b.hetreat3#1o.con~e{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1o.hetreat3#0b.con~e{res}            0                                                                   {txt}
                    {res} {ralign 12:{txt:(}.{txt:)}}                                                                   {txt}

{txt}1.hetreat3#1.conse~e{res}       0.0101                                                                   {txt}
                    {res} {ralign 12:{txt:(}0.0403{txt:)}}                                                                   {txt}

{txt}UK Native           {res}       0.0535          0.0354          0.0538          0.0503          0.0380   {txt}
                    {res} {ralign 12:{txt:(}0.0357{txt:)}}    {ralign 12:{txt:(}0.0350{txt:)}}    {ralign 12:{txt:(}0.0356{txt:)}}    {ralign 12:{txt:(}0.0358{txt:)}}    {ralign 12:{txt:(}0.0388{txt:)}}   {txt}

{txt}White               {res}       0.0868**        0.0801*         0.0892**        0.0894**        0.0661+  {txt}
                    {res} {ralign 12:{txt:(}0.0330{txt:)}}    {ralign 12:{txt:(}0.0326{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0329{txt:)}}    {ralign 12:{txt:(}0.0357{txt:)}}   {txt}

{txt}children            {res}        0.115***       0.0995***        0.112***        0.113***        0.112***{txt}
                    {res} {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}    {ralign 12:{txt:(}0.0201{txt:)}}   {txt}

{txt}female              {res}        0.117***        0.118***        0.115***        0.115***        0.106***{txt}
                    {res} {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0175{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0179{txt:)}}    {ralign 12:{txt:(}0.0189{txt:)}}   {txt}

{txt}age                 {res}    -0.000111       -0.000607         0.00103        0.000322        0.000239   {txt}
                    {res} {ralign 12:{txt:(}0.000554{txt:)}}    {ralign 12:{txt:(}0.000535{txt:)}}    {ralign 12:{txt:(}0.000639{txt:)}}    {ralign 12:{txt:(}0.000534{txt:)}}    {ralign 12:{txt:(}0.000561{txt:)}}   {txt}

{txt}somecollege         {res}       -0.156***       -0.127***       -0.158***       -0.158***       -0.158***{txt}
                    {res} {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0186{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0187{txt:)}}    {ralign 12:{txt:(}0.0198{txt:)}}   {txt}

{txt}incometsd           {res}     -0.00111**     -0.000765+      -0.000904*      -0.000576       -0.000834*  {txt}
                    {res} {ralign 12:{txt:(}0.000399{txt:)}}    {ralign 12:{txt:(}0.000391{txt:)}}    {ralign 12:{txt:(}0.000395{txt:)}}    {ralign 12:{txt:(}0.000465{txt:)}}    {ralign 12:{txt:(}0.000425{txt:)}}   {txt}

{txt}incomeimp           {res}       0.0130          0.0163          0.0178          0.0186          0.0288   {txt}
                    {res} {ralign 12:{txt:(}0.0350{txt:)}}    {ralign 12:{txt:(}0.0342{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0349{txt:)}}    {ralign 12:{txt:(}0.0364{txt:)}}   {txt}

{txt}Crowdout            {res}       0.0877***       0.0895***       0.0862***       0.0861***       0.0854** {txt}
                    {res} {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0253{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0260{txt:)}}    {ralign 12:{txt:(}0.0276{txt:)}}   {txt}

{txt}No primes           {res}      -0.0298         -0.0411         -0.0328         -0.0325         -0.0336   {txt}
                    {res} {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0296{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0303{txt:)}}    {ralign 12:{txt:(}0.0322{txt:)}}   {txt}

{txt}0b.Brexiteer        {res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.Brexiteer         {res}                        0.196***                                                {txt}
                    {res}                 {ralign 12:{txt:(}0.0216{txt:)}}                                                   {txt}

{txt}0b.hetreat3#0b.bre~r{res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}0b.hetreat3#1o.bre~r{res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1o.hetreat3#0b.bre~r{res}                            0                                                   {txt}
                    {res}                 {ralign 12:{txt:(}.{txt:)}}                                                   {txt}

{txt}1.hetreat3#1.brexi~r{res}                     -0.00265                                                   {txt}
                    {res}                 {ralign 12:{txt:(}0.0355{txt:)}}                                                   {txt}

{txt}c.hetreat3#c.age    {res}                                     -0.00211*                                  {txt}
                    {res}                                 {ralign 12:{txt:(}0.00104{txt:)}}                                   {txt}

{txt}o.age               {res}                                            0                                   {txt}
                    {res}                                 {ralign 12:{txt:(}.{txt:)}}                                   {txt}

{txt}c.hetreat3#c.incom~d{res}                                                    -0.000990                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.000729{txt:)}}                   {txt}

{txt}o.incometsd         {res}                                                            0                   {txt}
                    {res}                                                 {ralign 12:{txt:(}.{txt:)}}                   {txt}

{txt}Ten year migration~t{res}                                                                       0.0612   {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.115{txt:)}}   {txt}

{txt}c.hetreat3#c.tenye~t{res}                                                                       -0.148   {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.185{txt:)}}   {txt}

{txt}Constant            {res}        0.395***        0.358***        0.354***        0.379***        0.424***{txt}
                    {res} {ralign 12:{txt:(}0.0531{txt:)}}    {ralign 12:{txt:(}0.0520{txt:)}}    {ralign 12:{txt:(}0.0554{txt:)}}    {ralign 12:{txt:(}0.0533{txt:)}}    {ralign 12:{txt:(}0.0607{txt:)}}   {txt}
{txt}{hline 100}
{txt}Observations        {res}         3000            3000            3000            3000            2704   {txt}
{txt}R-squared           {res}        0.084           0.117           0.083           0.082           0.073   {txt}
{txt}{hline 100}
{txt}Standard errors in parentheses
{txt}+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

{com}.                 
.         
.         
.  ///Tex: esttab est1 est2 est3 est4 est5 est6 using "HCFlightOLSSubgroups.tex", drop( ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>   
.  ///Tex:   esttab est7 est8 est9 est10 est11   using "HCFlightOLS2Subgroups2.tex", drop(  ) noconstant se r2 l  star(+ 0.10 * 0.05 ** 0.01 *** 0.001) replace
>                 
.                 
.   
.                 
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/carlosxabel/Google Drive New/HE UK/Analysis PSRM/Final codes/20200107 Log for PSRM review.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 7 Jan 2021, 17:59:47
{txt}{.-}
{smcl}
{txt}{sf}{ul off}